<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%-- <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> --%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<html>
<head>
	<title>客户分类</title>
</head>

<body>
	<c:if test="${not empty message}">
		<div id="message" class="alert alert-success"><button data-dismiss="alert" class="close">×</button>${message}</div>
	</c:if>
	<div class="legend">
		<div class="row">
			<div class="span3">
				<span class="list-title">客户分类</span>
			</div>
			<div class="span2 offset7">
				<tags:standardselect />
			</div>
		</div>
	</div>
	<div class="pull-right">
			<form class="form-search" action="#">
				<label>名称：</label> <input type="text" name="search_LIKE_name" class="input-medium" value="${param.search_LIKE_name}"> 
			 	<label>编号：</label> <input type="text" name="search_LIKE_number" class="input-medium" value="${param.search_LIKE_number}"> 
			    <button type="submit" class="btn">搜索</button>
		    </form>
	</div>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead><tr><th>编号</th><th>名称</th><th>备注</th><th>状态</th><th>操作</th></tr></thead>
		<tbody>
		<c:forEach items="${categorys.content}" var="category">
			<tr>
				<td>${category.number}</td>
				<td>${category.name}</td>
				<td>${category.remark}</td>
				<td>${category.statusName}</td>
				<td>
					<c:if test="${category.status == 1}">
						<a href="${ctx}/category/disable/${category.id}">禁用</a>
					</c:if>
					<c:if test="${category.status == 0}">
						<a href="${ctx}/category/enable/${category.id}">启用</a>
						<a href="${ctx}/category/update/${category.id}">编辑</a>
						<a href="${ctx}/category/delete/${category.id}">删除</a>
					</c:if>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	
	<tags:pagination page="${categorys}" paginationSize="10"/>

	<div><a class="btn" href="${ctx}/category/create">新建</a></div>
</body>
</html>
